home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Acao / DemonicDefence3.swf / scripts / DefineButton2_1185 / BUTTONCONDACTION on(release).as next >
Encoding:
Text File  |  2005-09-27  |  1.2 KB  |  53 lines

  1. on(release){
  2.    if(_root.money >= 800 + _root.gunnah * 800)
  3.    {
  4.       if(_root.gunnah < 8)
  5.       {
  6.          _root.money -= 800 + _root.gunnah * 800;
  7.          _root.gunnah += 1;
  8.          if(_root.gunnah == 1)
  9.          {
  10.             _root.gunny1.gotoAndPlay(1);
  11.          }
  12.          else if(_root.gunnah == 2)
  13.          {
  14.             _root.gunny2.gotoAndPlay(1);
  15.          }
  16.          else if(_root.gunnah == 3)
  17.          {
  18.             _root.gunny3.gotoAndPlay(1);
  19.          }
  20.          else if(_root.gunnah == 4)
  21.          {
  22.             _root.gunny4.gotoAndPlay(1);
  23.          }
  24.          else if(_root.gunnah == 5)
  25.          {
  26.             _root.gunny5.gotoAndPlay(1);
  27.          }
  28.          else if(_root.gunnah == 6)
  29.          {
  30.             _root.gunny6.gotoAndPlay(1);
  31.          }
  32.          else if(_root.gunnah == 7)
  33.          {
  34.             _root.gunny7.gotoAndPlay(1);
  35.          }
  36.          else if(_root.gunnah == 8)
  37.          {
  38.             _root.gunny8.gotoAndPlay(1);
  39.          }
  40.          messo = "Got a gunner!";
  41.          _root.price = 800 + _root.gunnah * 800 + "g";
  42.       }
  43.       else
  44.       {
  45.          messo = "Gunner Limit reached";
  46.       }
  47.    }
  48.    else
  49.    {
  50.       messo = "Not Enough Money!";
  51.    }
  52. }
  53.